package org.oslims.client.view.impl;

import org.oslims.client.uicomponents.editbox.EditLabManagerBox;
import org.oslims.client.view.LabManagerEditorView;
import org.oslims.domain.LabManager;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.SimplePager;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.VerticalPanel;

public class LabManagerEditorViewImpl extends BaseViewImpl implements LabManagerEditorView {

	final Button addLabManagerButton = new Button("Add Lab Manager");
	Integer defaultPageSize = 15;
	final CellTable<LabManager> labManagerTable = new CellTable<LabManager>(defaultPageSize);
	final SimplePager<LabManager> pager = new SimplePager<LabManager>(labManagerTable);

	EditLabManagerBox editLabManagerBox = new EditLabManagerBox();

	public LabManagerEditorViewImpl() {
		VerticalPanel vp = new VerticalPanel();

		vp.add(labManagerTable);
		vp.add(pager);
		vp.add(addLabManagerButton);

		initWidget(vp);
	}

	@Override
	public HasClickHandlers getAddLabManagerButton() {
		return addLabManagerButton;
	}

	@Override
	public CellTable<LabManager> getTable() {
		return labManagerTable;
	}

	@Override
	public EditLabManagerBox getEditLabManagerBox() {
		return editLabManagerBox;
	}

	@Override
	public Integer getDefaultPageSize() {
		return defaultPageSize;
	}

	@Override
	public SimplePager<LabManager> getPager() {
		return pager;
	}

}
